<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="jquery-1.12.4.min.js"></script>
    <script>
        window.onload = function(){
            var obj = document.getElementById('div-1');
            console.log('原生js:' + obj);
        }

        // 使用jquery打印标签信息
        $(document).ready(
            function(){
                var obj = document.getElementById('div-1');
                console.log('jquery:' + obj);
            }
        );

        // jquery简写方式
        $(
            function(){
                var obj = document.getElementById('div-1');
                console.log('简写jquery:' + obj);
            }
        )
    </script>
</head>
<body>
    <div id="div-1">这是一个div-1</div>
</body>
</html>